package com.bluefish.bltuan.tools.user;

public enum UserRight {

	NORMAL(0),ADMIN(777),SUPERADMIN(999);
	
	private int right;
	
	public int getRight(){
		return this.right;
	}
	
	public static UserRight getCorrespondingRight(int right){
		switch (right) {
		case UserRightNumber.NORMAL_NUMBER:
			return NORMAL;
		case UserRightNumber.ADMIN_NUMBER:
			return ADMIN;
		case UserRightNumber.SUPERADMIN_NUMBER:
			return SUPERADMIN;
		default:
			return null;
		}
	}
	
	private UserRight(int right) {
		this.right = right;
	}
}
